from openpyxl import load_workbook
from openpyxl.styles import Border, Side
workbook = load_workbook('F:\\python\\第5章\\出库表4.xlsx')
worksheet = workbook['Sheet1']
area = worksheet['A2:E16']
style = Side(border_style='thin', color='000000')
for i in area:
    for j in i:
        j.border = Border(left=style, right=style, top=style, bottom=style)
workbook.save('F:\\python\\第5章\\出库表5.xlsx')
